@use "sass:math";
@import "../../css/variables";

.search-results, .search-results-none {
  font-size: $font-size-small;
  overflow: auto;
  list-style-type: none;
  padding-left: 0;
  display: none;

  &.visible {
    display: block;
  }
}

.search-results {
  list-style-type: none;
  padding: 0;
  margin-bottom: 0;

  li {
    display: block;
    padding: math.div($spacer, 2);
    margin-bottom: $spacer;
    border-radius: $border-radius-tiny;
    border: 1px solid transparent;
    cursor: pointer;
    max-width: 17rem;
    overflow-x: hidden;

    &.active {
      background-color: $gray-100;
      border: 1px solid $gray-200;
    }

    h5 {
      margin: 0 0 math.div($spacer, 2) 0;
      font-size: 1em;
    }

    .search-results-highlight {
      background-color: yellow;
    }
  }
}

.search-results-none {
  padding: $spacer math.div($spacer, 2);
  text-align: center;
  width: 100%;
}
